package cc.openkit.kitadmin_2.service.admin.impl;

import cc.openkit.kitadmin_2.dao.admin.KitAdminDao;
import cc.openkit.kitadmin_2.entity.admin.KitAdmin;
import cc.openkit.kitadmin_2.service.admin.KitAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KitAdminServiceImpl implements KitAdminService {

    @Autowired
    KitAdminDao kitAdminDao;


    public KitAdmin queryKitAdminByUsername(String username) {
        // 根据用户名查询
        List<KitAdmin> kitAdminList = kitAdminDao.queryKitAdminByUsername(username);
        if(kitAdminList.size() == 0 ){
            return null;
        }
        return kitAdminList.get(0);
    }
}
